<!DOCTYPE html>
<html>
	 
	 <head>
	 	<meta charset="utf-8">
	 	<title>buyfunshop</title>
	 	<meta name="promotion-tip" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=no" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
		<meta property="og:type"          content="website" />
		<meta property="og:title"         content="【buyfunshop】" />
		<meta property="og:image"         content="//yinibuy2.oss-cn-hongkong.aliyuncs.com/729419af-b34f-4126-be31-e36aad7582dd.jpg" />
		<meta property="og:url"         content="www.buyfunshop.com" />		
		<link rel="stylesheet" href="../dists/mdui-0.4.3/css/mdui.css" />
		<link rel="stylesheet" href="../dists/city-picker/css/city-picker.css" />
		<link rel="stylesheet" href="../resources/css/common.css"/>
		<style type="text/css">
			html, body{-webkit-text-size-adjust: 100%;-webkit-tap-highlight-color: rgba(0, 0, 0, 0);}
			.mdui-container-fluid{margin-top: 48px;}
			.mdui-bottom-nav{max-width: 750px; margin: 0px auto;}
			
			.template-split{width: 100%; height: 8px; background: transparent;}
			
			.mdui-head-nav{position: fixed; top: 0px; left: 0px; right: 0px; width: 100%; height: 48px; line-height: 48px; text-align: center; background: #FFF; box-sizing: border-box;box-shadow: 0 0px 4px 0px #bbb; max-width: 750px; margin: 0 auto; z-index: 1;padding: 0 10px;display: flex;align-items: center;justify-content: space-between;}
			.mdui-head-nav > span{font-size: 16px; color: #2A363B;}
			
			.empty{display: none;}
			.empty_cart{display: flex; flex-wrap: wrap; flex-direction: column; justify-content: center; text-align: center; background: #FFF; height: 275px; box-sizing: border-box;}
			.empty_cart .empty_cart_img{ width: 80px; margin: 0 auto;}
			.empty_cart .empty_cart_text{color: #7B7B7B; font-size: 14px;margin: 24px auto 32px auto;}
			.empty_cart .empty_cart_btn{max-width: 100px; margin: 0px auto; background: linear-gradient(270deg,#ff4142,#ff4b2b); color: #FFFFFF; border-radius: 24px ; padding: 0px 24px;}
		
			.template-module-product-list-horizontal > .flex-row{padding-top: 0px;}
		
			.template-module-title{font-weight: bold; height: 40px; line-height: 40px; background: #FFF; padding: 0px 8px; overflow: hidden; box-sizing: border-box; border-bottom: 1px solid #EDEDED;}
			.template-module-title > span{float: left; font-size: 16px; font-family: PingFangSC-Regular;}
			.template-module-title > a{display: block; float: right; color: #333;line-height: 48px;}
			.template-module-title > a > i{color: #a5a5a5; font-weight: 100;margin-left: -5px; margin-right: -5px; vertical-align: middle;}
		
			.normal{margin-bottom: 80px;}
			.normal > div{overflow: hidden;}
			.normal .address-info{box-sizing: border-box;position: relative;padding: 8px 8px 0px 8px;cursor: pointer;min-height: 80px;}
			.normal .address-info > div{line-height: 24px;float: right;display: inline-block;width: 92%;}
			.normal .address-info .user-address-add{height: 48px;line-height: 48px;font-weight: bold;color: #666;font-size: 16px;letter-spacing: 2px;float: left;}
			.normal .address-info .user-address-add img{width: 4%;vertical-align: middle;margin-top: -14px;}
			.normal .address-info .user-address-add span{display: inline-block; padding-left: 10px;}
			.normal .address-info .user-contact{font-weight: bold;}
			.normal .address-info .user-contact > span:nth-child(1){margin-right: 12px;}
			.normal .address-info .user-address{font-size: 13px; overflow: hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-line-clamp: 1;-webkit-box-orient: vertical;}
			.normal .address-info > .mdui-btn{position: absolute; right: 0px; top: calc(50% - 20px);color: rgba(0, 0, 0, 0.4);}
			.normal .address-info img {margin-right: 10px;padding-top: 12px;display: inline-block;width: 4%;}
			
		    .normal .cart-lists{background: #FFFFFF; position: relative;}
			.normal .cart-lists > ul{width: 100%; align-items: center; height: 100%; display: block;}
			.normal .cart-lists > ul > li{display: block; box-sizing: border-box; position: relative;padding: 14px 0px;border-bottom: 1px solid #eee;}
			.normal .cart-lists > ul > li:last-child{border-bottom: 0;}
			.normal .cart-lists > ul > li > button.radios{position: absolute; top: 36px;}
			.normal .cart-lists > ul > li > button.radios > i{color: #4c4c4c; font-size: 22px;}
			.normal .cart-lists > ul > li > button.radios.active > i{color: #ff4142;}
			.normal .cart-lists > ul > li > a{text-decoration:none; margin-left: 8px;}
			.normal .cart-lists > ul > li img.product-img{width: 80px;display: inline-block;vertical-align: top;border-radius: 4px;}
			.normal .cart-lists > ul > li > .product-text{display: inline-block; width: calc(100% - 120px);;padding: 0 6px;position: relative;}
			.normal .cart-lists > ul > li > .product-text > .title{display: block; margin-top: 4px; font-size: 14px; color: #000;overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;}
			.normal .cart-lists > ul > li > .product-text > .skuName{display: block; margin-top: 6px; color: #bcbcbc; font-size: 12px;overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;}
			.normal .cart-lists > ul > li > .product-text > .downprice{position: absolute; font-size: 12px; color: #ff0000; bottom: 24px;}
			.normal .cart-lists > ul > li > .product-text > .price{ margin-top: 28px;color: #9F0000; font-size: 16px; font-weight: bold;display: flex; justify-content: space-between;}
			.normal .cart-lists > ul > li > .product-text > .price .originalPrice{font-size: 10px; color: #BBBBBB;font-weight: normal; text-decoration: line-through; margin-left: 4px;}
			.normal .cart-lists > ul > li > .product-text > .price .quantity{color: #000000; font-size: 80%; font-weight: normal;}
			.normal .cart-lists > ul > li > .mdui-numbox-container{position: absolute; bottom: 10px ; right: 10px;}
		    .normal .mdui-numbox{display: inline-block; position: relative; width: 92px; height: 24px; border-radius: 12px; color: #363636; border: 1px solid #e8e8e8; overflow: hidden;}
		    .normal .mdui-numbox > .mdui-numbox-btn{box-sizing: border-box; width: 30px; height: 24px; border: none; outline: 0; position: absolute; top: 0; background: #FFF;}
		    .normal .mdui-numbox > .mdui-numbox-btn > i.mdui-icon{font-size: 16px; color: #4B4B4B;}
		    .normal .mdui-numbox > .mdui-numbox-btn.mdui-numbox-btn-minus {left: 0; border-right: 1px solid #e8e8e8;}
		    .normal .mdui-numbox > .mdui-numbox-btn.mdui-numbox-btn-plus {right: 0; border-left: 1px solid #e8e8e8;}
		    .normal .mdui-numbox > .mdui-numbox-input{font-size: 14px; width: 100%; height: 100%; margin: 0; overflow: hidden; text-align: center; text-overflow: ellipsis; word-break: normal; border: none; outline: 0; padding: 0;}
		    .normal .cart-lists > ul > li >button.mdui-btn-delete{position: absolute; top: 4px; right: 4px; display: inline-block;}
			.normal .cart-lists > ul > li >button.mdui-btn-delete > i{color: #bcbcbc; font-size: 18px;}
			.normal .cart-lists > ul > li > div.freight{display: flex; justify-content: space-between; font-size: 13px; color: #000;box-sizing: border-box;}
			.normal .cart-lists > ul > li > div.freight > span.name{font-weight: bold;}
			.normal .cart-lists > ul > li > div.freight > span.value{color: #ff4142;font-weight: bold;font-size: 14px;}
			.normal .product {padding: 4px 10px;font-size: 14px;letter-spacing: 1px;border-bottom: 1px solid #e4e4e4;background-color: #FFFFFF !important;}
			.normal .product >span {height: 32px;line-height: 32px;font-weight: bold;}
			.payment{background: #FFFFFF; position: relative; color: #000000;}
			.payment > ul{width: 100%; align-items: center; height: 100%; display: block;letter-spacing: 1px;}
			.payment > ul > li{display: flex; justify-content: space-between; vertical-align: middle; height: 100%; box-sizing: border-box; position: relative;}
			.payment > ul > li.list-title{border-bottom: 1px solid #e4e4e4;}
			.payment > ul > li > span{height: 32px; line-height: 32px;position: relative;}
			.payment > ul > li > span > img{width: 24px;vertical-align: middle;margin-right: 4px;}
			.payment > ul > li > span > img:nth-child(1){margin-left: 8px;}
			.payment > ul > li > button.radios > i{color: #4c4c4c; font-size: 22px;}
			.payment > ul > li > button.radios.active > i{color: #9F0000;}
			.payment > ul >:first-child{border-bottom: 1px solid #eee;}
			.remark{background: #FFFFFF; color: #000000;}
			.remark > ul >li > input {    outline: none;border: none;padding: 4px 8px;line-height: 28px;width: calc(100% - 80px);}
			.remark > ul > li > span{height: 32px; line-height: 32px;}
			.remark textarea{resize: none; width: 100%; box-sizing: border-box;font-size: 14px;height: 65px;line-height: 22px;border: 0;padding: 0 4px;}
			
			@media screen and (min-width: 750px) {
				.empty_cart{height: 375px;}
		/* 		.normal .cart-lists > ul > li > .product-text{max-width: 200px;} */
				.hg-picker-container{max-width: 750px; left: calc(50% - 375px); right: calc(50% - 375px);}
			}
			.font-blod{font-weight: bold;}
			
			.mdui-cart-bottom{position: fixed; bottom: 0px; left: 0px; right: 0px; z-index: 1; background: #FFFFFF; height: 48px; box-shadow: 0 0px 4px 0px #bbb; box-sizing: border-box; max-width: 750px; display: flex;overflow: hidden;width: 100%;margin: 0 auto;}
			.mdui-cart-bottom .price{box-sizing: border-box; flex: 1; line-height: 48px; padding: 0px 16px;text-align: right;}
			.mdui-cart-bottom .price span{font-size: 12px;}
			.mdui-cart-bottom .price .salePrice{color: #9F0000; font-weight: bold; font-size: 20px; margin-left: 2px;}
			.mdui-cart-bottom .cart-submit{background: #9F0000; color: #FFFFFF; height: 42px;line-height: 42px; box-sizing: border-box; border-radius: 25px; width: 140px;margin: 3px;}
			
			.mdui-dialog.mdui-dialog-address{height: 100% !important; max-height: 100% !important; width: 100% !important; max-width: 750px !important;}
			@media screen and (max-width: 750px) {
				.mdui-dialog.mdui-dialog-address{top: 0px !important; bottom: 0px !important; width: 100% !important; height: 100% !important;  max-width: 100% !important; max-height: 100% !important;}
			}
			
			button.mdui-btn-icon{padding: 6px 0;}
			
			.product-delete-dialog .mdui-dialog-title{text-align: center; font-size: 14px;}
			.product-delete-dialog .mdui-dialog-actions{display: flex;}
			.product-delete-dialog .mdui-dialog-actions .mdui-btn{flex-grow: 1;border: 1px solid #F0F0F0; color: #333;}
			
			.StripeElement {box-sizing: border-box;height: 40px;padding: 10px 12px;border: 1px solid #F0F0F0; border-radius: 2px;background-color: white;box-shadow: 0 1px 3px 0 #e6ebf1;-webkit-transition: box-shadow 150ms ease;transition: box-shadow 150ms ease;}
			.StripeElement--focus {box-shadow: 0 1px 3px 0 #cfd7df;}
			.StripeElement--invalid {border-color: #fa755a;}
			.StripeElement--webkit-autofill {background-color: #fefde5 !important;}
			
			.stripe-dialog > .mdui-dialog-title{padding: 8px; font-size: 14px; border-bottom: 1px solid #F0F0F0;}
			.stripe-dialog > .mdui-dialog-title > .mdui-btn-icon{position: absolute;top: 4px; right: 8px; font-size: 14px; width: 20px; min-width: initial; color: rgba(0, 0, 0, 0.4);}
			.stripe-dialog .form-row > label{display: block; text-align: center; font-size: 13px; padding: 8px; color: #333;}
			.stripe-dialog .card-errors{font-size: 12px;}
			.stripe-dialog .mdui-btn-stripe-checkout{background: linear-gradient(270deg,#ff4142,#ff4b2b); color: #FFFFFF; display: inline-block;box-sizing: border-box;width: 100%; margin-top: 16px;}
			.stripe-dialog .mdui-dialog-content{margin-bottom: 24px;}
			
			.freight .name span{font-size: 12px; color: #ff4142;}
			.freight .name .basic-freihgt{margin-left: 4px;}
			.freight .name .salePrice:before{font-size: 10px;margin-left: 0px 0px 0px 2px;}
			
			.address-region-container{position: relative; padding: 8px 0px;}
			.address-region-container .mdui-icon.material-icons{color: rgba(0, 0, 0, .3); position: absolute; bottom: 8px; padding: 6px;}
			.address-region-container .city-picker-span{flex: 1; height: 32px !important; color: #2A363B; opacity: 1.0; font-size: 12px; padding: 4px 0px; box-sizing: border-box;border-bottom: 0;}
			.address-region-container .city-picker-span.open{border-bottom: 1px solid #7C7C7C !important;}

			.list-title{padding-left: 10px!important;padding-right: 10px!important;font-size: 14px; letter-spacing: 1px;border-bottom: 1px solid #e4e4e4;}
			/* .list-item-product::after{content: ''; display: block;height: 1px; background: #bbb;opacity: .2; margin-top: 8px;position: absolute;bottom: 0;left: 38px;right: 10px;} */

			.price-marking{display: none;}
			small{font-size:80%; color: #A51616; font-weight: initial; padding-left: 4px;}
			small .salePrice:before{font-size: 10px;}
			.price-number{background: #FFFFFF;position: relative;color: #000000;}
			.price-number .list-title span{height: 32px;line-height: 32px;}
			.price-number .list-li{display: flex; align-items: center; justify-content: space-between;padding: 16px 8px 0 8px;}
			.price-number .list-li:last-child{padding-bottom: 16px;}
			.price-number .list-li span.minus{color: #ff3450;}
			
			.mdui-card-row-container{display: none; padding: 4px 8px; background: #FFF; line-height: 36px; font-size: 13px; margin-top: 1px;}
			.mdui-card-row-container .center{flex-grow: 1; color: #9F0000;padding: 0px 4px;}
			.mdui-card-row-container .rihgt{width: 32px; text-align: right; position: relative;}
			.mdui-card-row-container .rihgt svg{position: absolute; top: 6px; right: 0px;}
			.full_reduction_promotion{border-bottom: 1px solid #ececec;}
			.full_reduction_promotion .fullValue, .full_reduction_promotion .reductionValue{font-weight: bold; font-size: 120%;}
			
			.coupon{background: #FFFFFF;}
			.coupon li > span{height: 32px; line-height: 32px;}
			.coupon .coupon-use-btn{color: #666; font-size: 13px; border-radius: 8px; border: 1px solid #eee; min-width: initial; outline: none; background: #FFFFFF;-webkit-tap-highlight-color: rgba(0, 0, 0, 0);}
			.coupon .coupon-input{outline: none; border: none; padding: 4px 8px; line-height: 28px; width: calc(87% - 80px);}
			.coupon-error-msg{display: block; font-size: 12px; color: #FF0000;margin: 8px; display: none;}
			
			.price-coupon{display: none;}
			
			
			.goback .mdui-dialog-content{display: flex; align-items: center; justify-content: center;}
			.goback .mdui-dialog-content > span {margin-left: 8px; font-weight: bold; font-size: 16px; color: #222222;}
			.goback .mdui-dialog-actions {display: flex;justify-content: space-around; padding-bottom: 16px;}
			.goback .mdui-dialog-actions > .mdui-btn:nth-child(1){width: 45%; background: #F0F0F0; font-size: 15px; color: #222222; border-radius: 20px;}
			.goback .mdui-dialog-actions > .mdui-btn:nth-child(2){width: 45%; background: #9F0000; font-size: 15px; color: #FFFFFF; border-radius: 20px;}
			
			.couponCode-btn {display: none;}
			
			.stripe-bundle{position: absolute; width: 36px; height: 24px; line-height: 18px; background-image: url(../resources/img/cart-limit-time.png); background-size: 100% 100%; font-size: 12px; text-align: center; color: #FFFFFF; margin-top: -4px; transform: scale(0.8);}
		
			#address-region{flex-grow: 1;}
			#address-region select{display:block;width:100%;height:36px;line-height:36px;border:1px solid #e4e4e4;color:rgba(0,0,0,.87);outline:none;border-radius:2px;margin-bottom:8px;background: #FFF;}
			#address-region select:focus{border-color: #46A4FF;}
			#address-region select:last-child{margin-bottom: 0px;}
			
			.address-info{background: #FFF; padding: 0px 8px 8px 8px;}
			.address-info > ul{padding: 8px 0px;}
			.address-info > ul > li{line-height: 32px; display: flex; position: relative; margin-bottom: 8px;}
			.address-info > ul > li > span.lable{width: 92px; font-size: 13px;}
			.address-info > ul > li > input{flex-grow: 1;border: none; outline: none; border: 1px solid #e4e4e4; font-size: 13px; padding: 0px 8px; height: 36px;}
			.address-info > ul > li > input:focus{border-color: #46A4FF;}
			.city-picker-span{border-bottom: 1px solid #e4e4e4; height: 39px !important; font-size: 13px; flex-grow: 1;}
			.city-picker-span > .placeholder{color: #757575 !important; font-size: 12px !important; margin-top: 12px; display: inline-block;}
			.city-picker-span > span.title{margin-top: 12px; display: inline-block;}
			.city-select-tab > a{padding: 0px 22px;}
		</style>
	 </head>
	
	<body class="mdui-container-fluid">
		<div class="mdui-head-nav">
			<a id="cart-goback" href="javascript:history.back(-1);" style="display: none;"></a>
			<a class="mdui-btn mdui-btn-icon mdui-tab-back" onclick="app.methods.goBack();"><svg t="1587028723395" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7397" width="24" height="24"><path d="M641.28 278.613333l-45.226667-45.226666-278.634666 278.762666 278.613333 278.485334 45.248-45.269334-233.365333-233.237333z" p-id="7398"></path></svg></a>
			<span class="language" language="que_ren_ding_dan"></span>
			<a href="javascript:void(0);" class="mdui-btn mdui-btn-icon mdui-tab-back" style="opacity: 0;"></a>
		</div>
		
		<div class="empty">
			<div class="empty_cart">
				<img class="empty_cart_img" src="../resources/img/empty_cart.png" />
				<span class="empty_cart_text language" language="gou_wu_che_wei_kong"></span>
				<a href="../item/list.html" class="mdui-btn empty_cart_btn language" language="qu_guangguang"></a>
			</div>
			<div class="template-split"></div>
			<div class="product-recommend"></div>
		</div>
		
		<div class="normal">
			<div class="product">
				<span class="product-font language" language="quan_bu_shang_pin"></span>
			</div>
			<div class="cart-lists"></div>
			<div class="template-split"></div>
			
			<div class="template-module-title language" language="sjrdz"></span></div>
			<div class="address-info">
				<ul>
					<li>
						<span class="lable language" language="sjrxm"></span>
						<input id="address-name" type="text" class="language-placeholder" language="sjrxm"/>
					</li>
					<li>
						<span class="lable language" language="sjrdh"></span>
						<input id="address-tel" type="text" class="language-placeholder" language="sjrdh" />
					</li>
					<li>
						<span class="lable language" language="sjrdzqy"></span>
						<div id="address-region"></div>
					</li>
					<li>
						<span class="lable language" language="sjrdzxq"></span>
						<input id="address-details" type="text" class="language-placeholder" language="sjrdzxq" />
					</li>
					<li>
						<span class="lable language" language="sjrdzyb"></span>
						<input id="address-zipCode" readonly="readonly" type="text" class="language-placeholder" language="sjrdzyb" />
					</li>
					<li>
						<span class="lable language" language="sjrdzyx"></span>
						<input id="address-email" type="email" class="language-placeholder" language="sjrdzyx" />
					</li>
				</ul>
			</div>
			
			<div class="template-split"></div>
			
			
			<div class="payment">
				<ul>
					<li class="mdui-p-a-1 payment-li">
						<span><img src="../resources/img/cash.png"><span class="language" language="hdfk"></span></span>
						<button _paymentType="1" class="mdui-btn mdui-btn-icon payment-type radios active"><i class="mdui-icon material-icons">radio_button_checked</i></button>
					</li>
				</ul>
			</div>
			<div class="template-split"></div>
			<div class="coupon">
				<ul>
					<li class="mdui-p-a-1">
						<span class="language" language="you_hui_ma"></span>
						<input id="couponCode" class="coupon-input language-placeholder" language="qing_shu_ru_you_hui_ma" type="text" placeholder=""><button class="mdui-btn coupon-use-btn couponCode-btn language" language="qrxdbtn" onclick="app.methods.useCoupon()"></button>
						<span ></span>
					</li>
					<li class="coupon-error-msg"></li>
				</ul>
			</div>
			<div class="template-split"></div>
			<div class="price-number">
			<ul>
				<li class="price-total list-li">
					<span class="language" language="yuan_jia"></span>
					<span class="salePrice">0</span>
				</li>
				<li class="price-marking list-li" onclick="_marketing.openMarketing()"></li>
				<li class="price-coupon list-li"></li>
				<li class="price-freight list-li"></li>
			</ul>
			</div>
			<div class="template-split"></div>
			<div class="remark">
			<ul>
				<li class="mdui-p-a-1 list-title">
					<span class="font-blod language" language="ding_dan_bei_zhu"></span>
				</li>
				<li class="mdui-p-a-1">
					<textarea id="address-remark" maxlength="120" class="language-placeholder" language="ding_dan_bei_zhu" placeholder=""></textarea>
				</li>
			</ul>
			</div>
		</div>
		
		<div class="mdui-cart-bottom">
			<div class="price">
			<span id="cart-number"></span>	<span class="language" language="he_ji"></span><span id="cart-total-price" class="salePrice">--</span>
			</div>
			<button class="mdui-btn cart-submit language" language="qrxdbtn" onclick="app.methods.submitCart();"></button>
		</div>
		
	</body>
	<script src="../dists/mdui-0.4.3/js/mdui.js"></script>
	<script src="../dists/art-template/template-web.js"></script>
	<script src="../resources/js/common.js"></script>
	<script>
	  !function(f,b,e,v,n,t,s)
	  {if(f.fbq)return;n=f.fbq=function(){n.callMethod?
	  n.callMethod.apply(n,arguments):n.queue.push(arguments)};
	  if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
	  n.queue=[];t=b.createElement(e);t.async=!0;
	  t.src=v;s=b.getElementsByTagName(e)[0];
	  s.parentNode.insertBefore(t,s)}(window, document,'script',
	  'https://connect.facebook.net/en_US/fbevents.js');
	  fbq('init', commonConfig.getFbPiexId());
	  fbq('track', 'PageView');
	</script>
	
	<script id="normal-cart-product-list" type="text/html">
		<ul>
			<% for (var i = 0; i < cartPriceDTO.cartProductDTOs.length; i++) { %>
			<% if (cartPriceDTO.cartProductDTOs[i].checked) { %>
			<li class="list-item-product" _productId="<%=cartPriceDTO.cartProductDTOs[i].productId%>" _productSkuId="<%=cartPriceDTO.cartProductDTOs[i].productSkuId%>" _productSkuBarcode="<%=cartPriceDTO.cartProductDTOs[i].productSkuBarcode%>" _quantity="<%=cartPriceDTO.cartProductDTOs[i].quantity%>">
				<a href="../item/details.html?id=<%=cartPriceDTO.cartProductDTOs[i].productId%>">
					<img class="product-img" src="<%=cartPriceDTO.cartProductDTOs[i].productImageUrl%>" />
				</a>
				<div class="product-text">
					<span class="title"><%=cartPriceDTO.cartProductDTOs[i].productTitle%></span>
					<span class="skuName"><span class="language" language="gui_ge"></span>：<%=cartPriceDTO.cartProductDTOs[i].productSkuName%></span>
					
					<div class="price">
						<span class="salePrice"><%=cartPriceDTO.cartProductDTOs[i].productPrice%> <span class="originalPrice"><%=cartPriceDTO.cartProductDTOs[i].originalProductPrice%></span> </span>
						
						<span class="quantity">x<%=cartPriceDTO.cartProductDTOs[i].quantity%></span>
					</div>
				</div>
			</li>			
			<% } %>
			<% } %>
		</ul>
	</script>
	<script>
	$$('#couponCode').on('input propertychange', function(){
		var remindText = $$("#couponCode").val();
		if(remindText !== ''){
			$$('.couponCode-btn').show();
			return;
		}else{
			$$('.couponCode-btn').hide();
		}
});
	</script>
	<script>
		var app = {
			datas : {
				checkType: tools.getURLParam('checkType'),
				inst : new mdui.Dialog('#dialog' , {modal : false}),
				instStripe: new mdui.Dialog('#stripe-dialog' , {modal : true}),
				couponCode: null,
				cityPicker: null,
				phoneReg: null,
				stripe : {}
			},
			methods : {
				goHome : function(){
					mdui.snackbar({message: language.text('hao_xiang_zou_diu_le'), position: 'top'});
					setTimeout(function () {
					   window.location.href = '../item/list.html';
					}, 2000);
					return false;
				},
				
				initMarketInfo: function(){
					var _fullReduction = cacheSessionStorage.getCache('shopInfo').fullReduction;
					if(_fullReduction && _fullReduction.length > 0){
						
						var _html = '' ;
						$$.each(_fullReduction, function(index, tmp) {
							_html += language.text('qcm') + tmp.fullValue+ language.text('reduce') + tmp.reductionValue + (index != _fullReduction.length - 1 ? '，' : '。')
						});
						$$('.full_reduction_promotion .center').html(language.text('quan_chang') + _html);
						$$('.full_reduction_promotion').css('display', 'flex')
					}
				},
				initPhoneReg: function(){
					app.datas.phoneReg = eval(cacheSessionStorage.getCache('shopInfo').phoneReg) ;
				},
				initCart: function(){
					
					var cartProducts = [] ;
					
					var buynowCartProducts = cacheLocalstorage.getCache('buynowCartProducts') || [] ;
					if(buynowCartProducts.length > 0){ 
						$$.each(buynowCartProducts , function(index , cartProduct){
							cartProduct.checked = true ;
							cartProducts.push(cartProduct);
						});
						
						if(cartProducts.length == 0){
							app.methods.initEmptyCart();
						}else{
							app.methods.initAddressInfo();
							app.methods.initNormalCart(cartProducts , false);
						}
					}else{
						var _cartProducts = cacheLocalstorage.getCache('cartProducts') || [] ;
						$$.each(_cartProducts , function(index , cartProduct){
							if(cartProduct.checked)cartProducts.push(cartProduct);
						});
						
						if(cartProducts.length == 0){
							app.methods.initEmptyCart();
						}else{
							app.methods.initAddressInfo();
							app.methods.initNormalCart(cartProducts , true);
						}
					}
				},
				initEmptyCart: function(){
					$$('.normal').hide();
					$$('.empty').show();
                    $$('.mdui-cart-bottom').hide();
				},
				initAddressInfo: function(){
					var _address = cacheLocalstorage.getCache('address');
					if(_address && _address != ''){
						$$('#address-name').val(_address.consignee);
						$$('#address-tel').val(_address.tel);
						app.myCityPicker.setDatas(_address.province, _address.city, _address.district);
						$$('#address-details').val(_address.details);
						$$('#address-email').val(_address.email);
					}
				},
				initNormalCart: function(cartProducts , writeCash){
					app.methods.calculateCartPrice(cartProducts, writeCash);
				},
				initCheckType: function(){
					if(app.datas.checkType && app.datas.checkType != ''){
						$$('.payment > ul > li').eq(parseInt(app.datas.checkType) - 1).trigger('click');
						$$('.payment > ul > li > .mdui-btn.payment-type').each(function(index, element) {
						  	if(!$$(this).hasClass('active'))$$(this).parent().remove();
						});
					}
				},
				initCityPicker: function(){
					app.myCityPicker.render();
				},
				useCoupon: function(){
					var _couponCode = $$('#couponCode').val();
					if(_couponCode == '' || _couponCode.trim() == ''){
						if(app.datas.couponCode != null){
							app.datas.couponCode = null;
							app.methods.initCart();
						}else{
							$$('.coupon-error-msg').html(language.text('you_hui_ma_bu_cun_zai')).show();
							setTimeout(function(){$$('.coupon-error-msg').html('').hide()}, 2000);
						}
					}else{
						app.datas.couponCode = _couponCode ;
						app.methods.initCart();
					}
				},
				calculateCartPrice: function(cartProducts, writeCash){
					tools.loading();
					var _submitCarts = {
						cartProductRequests: cartProducts,
						couponCode: app.datas.couponCode
					};
					$$.ajax({
						url : commonConfig.websitePrefix() + '/api/shop/cart/calculation',
						method: 'POST',
						contentType : "application/json ; charset=utf-8",
					  	data: JSON.stringify(_submitCarts),
						success : function(result){
							if(result.code == 1){
								$$('.normal > .cart-lists').html(template('normal-cart-product-list', {'cartPriceDTO': result.datas}));
								app.methods.initMarketInfo();
								
								globalization.render();
								
								var totla_price = 0
								result.datas.cartProductDTOs.map(function(e){
									e.checked && (totla_price += JSON.parse(e.productTotalPrice))
								})
								$$('.price-number .price-total > span:last-child').html(totla_price)
								$$('.price-number .price-freight').html('<span>'+ language.text('yun_fei') +'<small><span class="basic-freihgt">( '+ language.text('qcm') +'</span><span class="salePrice">' + cacheSessionStorage.getCache('shopInfo').basicPrice + '</span><span>'+ language.text('by') +' )</span></small></span><span class="salePrice">'+result.datas.freight+'</span>')
								if( result.datas.fullReductionPromotion){
									$$('.price-number .price-marking').html('<span>'+ language.text('you_hui') +'<small><span class="basic-freihgt">( '+ language.text('qcm') +'</span><span class="salePrice">' + result.datas.fullReductionPromotion.fullValue + '</span><span> )</span></small></span><span class="minus">-<i class="salePrice" style="font-style: normal;"></i>'+result.datas.fullReductionPromotion.reductionValue+'</span>').show()
								}else{
									$$('.price-number .price-marking').hide();
								}
								
								$$('#cart-total-price').html(result.datas.price);
								$$('#cart-number').html('('+ language.text('he_ji') +result.datas.cartProductDTOs.length+ language.text('reduce') + ')')
								
								if(writeCash)cacheLocalstorage.setCache('cartProducts' , result.datas.cartProductDTOs);
								
								if(_submitCarts.couponCode != null){
									if(!result.datas.cartCoupon || result.datas.cartCoupon == null){
										$$('.coupon-error-msg').html(language.text('you_hui_ma_bu_cun_zai')).show();
										app.datas.couponCode = null;
										setTimeout(function(){$$('.coupon-error-msg').html('').hide()}, 2000);
										$$('.price-number .price-coupon').html('').hide();
									}else{
										$$('.price-number .price-coupon').html('<span>'+language.text('you_hui_ma')+'<small><span class="basic-freihgt">(' + result.datas.cartCoupon.promotionCode + ')</span></small></span><span class="minus">-<i class="salePrice" style="font-style: normal;"></i>'+result.datas.cartCoupon.reductionValue+'</span>').show()
									}
								}else{
									$$('.price-number .price-coupon').html('').hide();
								}
							}
						},
						error: function(xhr, textStatus) {
							if(xhr.status == 500 && JSON.parse(xhr.response) && JSON.parse(xhr.response).body && JSON.parse(xhr.response).body.message){
								app.methods.goHome();
							}
						},complete: function(){tools.hideLoading();}
					});
				},
				submitCart: function(){
					
					var _address = {
						consignee: $$('#address-name').val(),
						tel: $$('#address-tel').val(),
						contry: cacheSessionStorage.getCache('shopInfo').country || 'ALL',
						provice: $('#level-0').val(),
						city: $('#level-1').val(),
						district: $('#level-2').val(),
						details: $('#address-details').val(),
						email: $('#address-email').val(),
						zipCode: $('#address-zipCode').val()
					}
					
					cacheLocalstorage.setCache('address', _address);
					
					var _submitCarts = {
						submitAddressRequest: _address , 
						cartProductRequests: [],
						couponCode: app.datas.couponCode,
						payment: $$('.payment > ul > li > button.radios.payment-type.active').attr('_paymentType'),
						affiliate: cacheCookie.getCache('affiliate')
					};
					//TODO
					var buynowCartProducts = cacheLocalstorage.getCache('buynowCartProducts') || [] ;
					var cartProducts = cacheLocalstorage.getCache('cartProducts') || [] ;
					
					if(buynowCartProducts.length > 0){
						$$.each(buynowCartProducts , function(index , cartProduct){
							_submitCarts.cartProductRequests.push(cartProduct);
						});
					}else{
						$$.each(cartProducts , function(index , cartProduct){
							if(cartProduct.checked)_submitCarts.cartProductRequests.push(cartProduct);
						});
					}
					
					
					if(_submitCarts.cartProductRequests.length == 0){
						mdui.snackbar({message: language.text('mei_you_gou_mai_shang_pin'),position: 'top'});
						return;
					}
					if(!_submitCarts.submitAddressRequest || _submitCarts.submitAddressRequest == ''){
						mdui.snackbar({message: language.text('qing_tian_xie_shou_huo_xin_xi'),position: 'top'});
						return;
					}
					if(_submitCarts.submitAddressRequest.consignee.trim() == ''){
						mdui.snackbar({message: language.text('sjrxmwx'),position: 'top'});
						return;
					}
					if(_submitCarts.submitAddressRequest.city.trim() == ''){
						mdui.snackbar({message: language.text('sjrdzqywx'),position: 'top'});
						return;
					}
					if(_submitCarts.submitAddressRequest.details.trim() == ''){
						mdui.snackbar({message: language.text('sjrdzxqwz'),position: 'top'});
						return;
					}
					_submitCarts.remark = $$('#address-remark').val()
					
					// InitiateCheckout
					app.methods.initInitiateCheckoutMonitor(_submitCarts.cartProductRequests);
					
					if(_submitCarts.payment == 1){
						tools.loading();
						_monitor.addMonitor({'eventAims':'COD_SUBMIT', 'eventName': 'CLICK', 'aimsCategory': 'EVENT'});
						$$.ajax({
							url : commonConfig.websitePrefix() + '/api/shop/cart/submit',
							method: 'POST',
							contentType : "application/json ; charset=utf-8",
						  	data: JSON.stringify(_submitCarts),
							success : function(result){
								if(result.code == 1){
									mdui.snackbar({message: language.text('xia_dan_cheng_gong'),position: 'top'}, 1500);
									
									app.methods.initPurchaseMonitor(_submitCarts.cartProductRequests);
									
									var _newCartProducts = [] ; 
									$$.each(cartProducts , function(index , cartProduct){
										if(!cartProduct.checked)_newCartProducts.push(cartProduct);
									});
									cacheLocalstorage.setCache('cartProducts' , _newCartProducts);
									setTimeout(function () {
									   window.location.href = '../user/index.html?searchCode=' + result.datas.orderCode ; 
									}, 1000);
								}
							},
							error: function(xhr, textStatus) {
								if(xhr.status == 500 && JSON.parse(xhr.response) && JSON.parse(xhr.response).body && JSON.parse(xhr.response).body.message){
									mdui.snackbar({message: language.text('jie_suan_chu_cuo'),position: 'top'});
								}
							},complete: function(){tools.hideLoading();}
						});
					}else{
						tools.loading();
						_monitor.addMonitor({'eventAims':'STRIPE_BEFORE_SUBMIT', 'eventName': 'CLICK', 'aimsCategory': 'EVENT'});
						$$('script[src="https://js.stripe.com/v3/"]').remove();
						tools.loadScriptAsync('https://js.stripe.com/v3/' , function(){
							$$.ajax({
								url : commonConfig.websitePrefix() + '/api/shop/stripe/key',
								method: 'GET',
								contentType : "application/json ; charset=utf-8",
								success : function(result){
									if(result.code == 1){
										app.datas.stripe.stripe = Stripe(result.datas.stripeDataKey);
										app.datas.stripe.elements = app.datas.stripe.stripe.elements();
										app.datas.stripe.card = app.datas.stripe.elements.create('card');
										app.datas.stripe.card.mount('#card-element');
										app.datas.stripe.card.addEventListener('change', function(event) {
										  	var displayError = document.getElementById('card-errors');
										  	if (event.error) {
										    	displayError.textContent = event.error.message;
										  	} else {
										    	displayError.textContent = '';
										  	}
										});
										
										app.datas.instStripe.open();
									}
								},
								error: function(xhr, textStatus) {
									if(xhr.status == 500 && JSON.parse(xhr.response) && JSON.parse(xhr.response).body && JSON.parse(xhr.response).body.message){
										mdui.snackbar({message: language.text('jie_suan_chu_cuo'),position: 'top'});
									}
									tools.hideLoading();
								},complete: function(){tools.hideLoading();}
							});
						});
					}
				},
				stripeCheckout: function(){
					tools.loading();
					app.datas.stripe.stripe.createToken(app.datas.stripe.card).then(function(result) {
					    if (result.error) {
					      var errorElement = document.getElementById('card-errors');
					      errorElement.textContent = result.error.message;
					      tools.hideLoading();
					    } else {
					    	var stripeToken = result.token.id;
					    	
					    	var _submitCarts = {
								submitAddressRequest: cacheLocalstorage.getCache('address') , 
								cartProductRequests: [],
								payment: 2,
								stripeToken: stripeToken,
								affiliate: cacheCookie.getCache('affiliate')
							};
							var cartProducts = cacheLocalstorage.getCache('cartProducts') || [] ;
							$$.each(cartProducts , function(index , cartProduct){
								if(cartProduct.checked)_submitCarts.cartProductRequests.push(cartProduct);
							});
					    	_monitor.addMonitor({'eventAims':'STRIPE_SUBMIT', 'eventName': 'CLICK', 'aimsCategory': 'EVENT'});
					    	$$.ajax({
								url : commonConfig.websitePrefix() + '/api/shop/stripe/checkout',
								method: 'POST',
								contentType : "application/json ; charset=utf-8",
							  	data: JSON.stringify(_submitCarts),
								success : function(result){
									if(result.code == 1){
										mdui.snackbar({message: language.text('xia_dan_cheng_gong'),position: 'top'}, 1500);
										
										app.methods.initPurchaseMonitor(_submitCarts.cartProductRequests);
										
										var _newCartProducts = [] ; 
										$$.each(cartProducts , function(index , cartProduct){
											if(!cartProduct.checked)_newCartProducts.push(cartProduct);
										});
										cacheLocalstorage.setCache('cartProducts' , _newCartProducts);
										
										setTimeout(function () {
										   window.location.href = '../user/index.html?searchCode=' + result.datas.orderCode ; 
										}, 1000);
									}
								},
								error: function(xhr, textStatus) {
									if(xhr.status == 500 && JSON.parse(xhr.response) && JSON.parse(xhr.response).body && JSON.parse(xhr.response).body.message){
										mdui.snackbar({message: language.text('jie_suan_chu_cuo'),position: 'top'});
									}
								},complete: function(){tools.hideLoading();}
							});
					    }
					});
				},
				initInitiateCheckoutMonitor: function(cartProductRequests){
					console.log(cartProductRequests)
					var _fbparams = {
						content_category: 'default',
						content_type: 'product',
						content_ids: [],
						contents: [],
						currency: cacheSessionStorage.getCache('shopInfo').currencuy,
						num_items: 0,
						value: 0,
						eventref: 'fb_oea'
					}
					$$.each(cartProductRequests , function(index , cartProduct){
						_fbparams.content_ids.push(cartProduct.productId);
						_fbparams.contents.push({'id': cartProduct.productId, 'quantity': cartProduct.quantity});
						_fbparams.num_items = _fbparams.num_items + cartProduct.quantity ; 
						_fbparams.value = _fbparams.value + cartProduct.productPrice * parseInt(cartProduct.quantity) ;
						
						_monitor.addMonitor({'eventAims':'INIT_CHECKOUT', 'eventName': 'CLICK', 'aimsCategory': 'EVENT'});
					});
					fbq('track', 'InitiateCheckout' ,_fbparams);
				},
				initPurchaseMonitor: function(cartProductRequests){
					
					var _fbparams = {
						content_category: 'default',
						content_type: 'product',
						content_ids: [],
						contents: [],
						currency: cacheSessionStorage.getCache('shopInfo').currencuy,
						num_items: 0,
						value: 0
					}
					$$.each(cartProductRequests , function(index , cartProduct){
						_fbparams.content_ids.push(cartProduct.productId);
						_fbparams.contents.push({'id': cartProduct.productId, 'quantity': cartProduct.quantity, "price": cartProduct.productPrice, "name": cartProduct.productTitle});
						_fbparams.num_items = _fbparams.num_items + cartProduct.quantity ; 
						_fbparams.value = _fbparams.value + cartProduct.productPrice * parseInt(cartProduct.quantity) ;
						
						_monitor.addMonitor({'eventAims': cartProduct.productId, 'eventName': 'PURCHASE', 'aimsCategory': 'PRODUCT', 'hostName': window.location.hostname});
						
					});
					fbq('track', 'Purchase' ,_fbparams);
				},
				goBack: function(){
					mdui.dialog({
						cssClass: 'goback',
					  	content: '<svg t="1600254326210" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2733" width="48" height="48"><path d="M915.626667 472.746667c0 231.253333-194.56 418.133333-435.2 418.133333s-435.2-186.88-435.2-418.133333 194.56-418.133333 435.2-418.133334 435.2 187.733333 435.2 418.133334" fill="#FFE04A" p-id="2734"></path><path d="M480.426667 903.68c-246.613333 0-448-192.853333-448-430.933333S232.96 42.666667 480.426667 42.666667s448 192.853333 448 430.933333-201.386667 430.08-448 430.08z m0-836.266667C246.613333 67.413333 57.173333 249.173333 57.173333 472.746667S246.613333 878.933333 480.426667 878.933333s423.253333-181.76 423.253333-405.333333S713.386667 67.413333 480.426667 67.413333z" fill="#545971" p-id="2735"></path><path d="M480.426667 759.466667C302.933333 759.466667 150.186667 702.293333 76.8 580.266667c50.346667 174.933333 211.626667 302.933333 402.773333 302.933333s353.28-128 402.773334-302.933333C810.666667 702.293333 657.066667 759.466667 480.426667 759.466667" fill="#FFD05A" p-id="2736"></path><path d="M328.533333 295.253333c-0.853333 0-2.56 0-3.413333-0.853333l-126.293333-37.546667c-6.826667-1.706667-10.24-8.533333-8.533334-15.36 1.706667-6.826667 8.533333-10.24 15.36-8.533333l126.293334 37.546667c6.826667 1.706667 10.24 8.533333 8.533333 15.36-1.706667 5.973333-6.826667 9.386667-11.946667 9.386666zM626.346667 295.253333c-5.12 0-10.24-3.413333-11.946667-9.386666-1.706667-6.826667 1.706667-13.653333 8.533333-15.36l126.293334-37.546667c6.826667-1.706667 13.653333 1.706667 15.36 8.533333 1.706667 6.826667-1.706667 13.653333-8.533334 15.36l-126.293333 37.546667c-0.853333 0.853333-2.56 0.853333-3.413333 0.853333z" fill="#545971" p-id="2737"></path><path d="M350.72 354.986667c0-12.8-11.093333-23.04-23.893333-23.04H203.946667c-13.653333 0-23.893333 10.24-23.893334 23.04v552.106666c0 12.8-5.973333 31.573333-13.653333 42.666667l-26.453333 38.4c-7.68 10.24-2.56 19.626667 10.24 19.626667h229.546666c13.653333 0 17.92-8.533333 10.24-19.626667l-26.453333-38.4c-7.68-10.24-13.653333-29.866667-13.653333-42.666667V354.986667zM804.693333 1006.933333c13.653333 0 17.92-8.533333 10.24-19.626666l-26.453333-38.4c-7.68-10.24-13.653333-29.866667-13.653333-42.666667V354.986667c0-12.8-11.093333-23.04-23.893334-23.04H628.906667c-13.653333 0-23.893333 10.24-23.893334 23.04v552.106666c0 12.8-5.973333 31.573333-13.653333 42.666667l-26.453333 38.4c-7.68 10.24-2.56 19.626667 10.24 19.626667h229.546666z" fill="#88C8FC" p-id="2738"></path><path d="M813.226667 331.946667c0 8.533333-9.386667 14.506667-20.48 14.506666h-204.8c-11.093333 0-20.48-6.826667-20.48-14.506666s9.386667-14.506667 20.48-14.506667h204.8c11.093333 0 20.48 5.973333 20.48 14.506667M388.266667 331.946667c0 8.533333-9.386667 14.506667-20.48 14.506666H162.133333c-11.093333 0-20.48-6.826667-20.48-14.506666s9.386667-14.506667 20.48-14.506667h204.8c11.946667 0 21.333333 5.973333 21.333334 14.506667" fill="#545971" p-id="2739"></path><path d="M477.013333 468.48c-23.04-0.853333-44.373333 17.92-46.933333 41.813333l-25.6 256c-2.56 23.04 14.506667 41.813333 38.4 41.813334l75.093333-1.706667c23.04-0.853333 40.96-19.626667 38.4-43.52l-25.6-250.88c-2.56-23.04-23.04-42.666667-46.933333-43.52h-6.826667z" fill="#DD6B73" p-id="2740"></path><path d="M442.026667 820.053333c-14.506667 0-28.16-5.973333-37.546667-16.213333-9.386667-10.24-14.506667-24.746667-12.8-40.106667l25.6-256c2.56-29.866667 29.013333-52.906667 58.88-52.906666h7.68c29.866667 0.853333 56.32 25.6 58.88 54.613333l24.746667 250.88c1.706667 14.506667-3.413333 29.013333-12.8 40.106667-9.386667 11.093333-23.04 17.066667-38.4 17.066666l-75.093334 1.706667c1.706667 0.853333 0.853333 0.853333 0.853334 0.853333z m34.133333-339.626666c-16.213333 0-31.573333 13.653333-33.28 29.866666l-25.6 256c-0.853333 7.68 1.706667 14.506667 5.973333 19.626667 5.12 5.12 11.946667 7.68 18.773334 7.68l75.093333-1.706667c7.68 0 14.506667-3.413333 19.626667-8.533333s6.826667-12.8 6.826666-20.48L518.826667 512c-1.706667-17.066667-17.066667-31.573333-34.133334-31.573333h-8.533333c0.853333 0 0 0 0 0z" fill="#545971" p-id="2741"></path><path d="M826.88 897.706667m-28.16 0a28.16 28.16 0 1 0 56.32 0 28.16 28.16 0 1 0-56.32 0Z" fill="#88C8FC" p-id="2742"></path><path d="M576 945.493333m-24.746667 0a24.746667 24.746667 0 1 0 49.493334 0 24.746667 24.746667 0 1 0-49.493334 0Z" fill="#88C8FC" p-id="2743"></path><path d="M119.466667 897.706667m-23.04 0a23.04 23.04 0 1 0 46.08 0 23.04 23.04 0 1 0-46.08 0Z" fill="#88C8FC" p-id="2744"></path></svg><span>'+language.text("que_ren_fang_qi_jie_suan")+'</span>',
					  	buttons: [{text: language.text('fang_qi'), onClick: function(inst){$$('#cart-goback').trigger('click');}}, {text: language.text('ji_xu_gou_wu')}]
					});
				}
			},
			myCityPicker: {
				render: function(){
					
					var _addressBase = JSON.parse(cacheSessionStorage.getCache('shopInfo').addressBase);
					
					var maxLevel = 0 ;
					if(_addressBase && _addressBase.length > 0){
						maxLevel += 1;
						if(_addressBase[0].childrens && _addressBase[0].childrens.length > 0){
							maxLevel += 1;
						}
						if(_addressBase[0].childrens[0].childrens && _addressBase[0].childrens[0].childrens.length > 0){
							maxLevel += 1;
						}
					}
					
					var _outerhtml = '';
					for(var levelIndex = 0; levelIndex < maxLevel; levelIndex++){
						_outerhtml += `<select id="level-${levelIndex}" onchange="app.myCityPicker.change(${levelIndex}, this)"></select>`;
					}
					
					$$('#address-region').html(_outerhtml);
					
					
					var _innerhtml = ``;
					$$.each(_addressBase, function(index, _address){
						_innerhtml += `<option value='${_address.name}' zipcode='${_address.zipcode}' childrens='${JSON.stringify(_address.childrens)}'>${_address.name}</option>`;
					})
					$$('#level-0').html(_innerhtml);
					$$('#level-0').trigger('change');
					
				},
				change: function(levelIndex, target){
					var _selectedDom = $$(target).children('option').eq(target.selectedIndex);
					var _childrens = _selectedDom.attr('childrens');
					if(_childrens && JSON.parse(_childrens).length > 0){
						var childrens = JSON.parse(_childrens);
						var _html = ``;
						$$.each(childrens, function(index, _children){
							_html += `<option value='${_children.name}' zipcode='${_children.zipcode}' childrens='${JSON.stringify(_children.childrens)}'>${_children.name}</option>`;
						})
						$$('#level-' + (levelIndex + 1)).html(_html);
						$$('#level-' + (levelIndex + 1)).trigger('change');
						$$('#address-details').val('');
					}else{
						$$('#address-zipCode').val(_selectedDom.attr('zipcode'));
					}
				},
				setDatas: function(provice, city, district){
					if(provice)$$('#level-0').val(provice);
					if(city)$$('#level-1').val(city);
					if(district)$$('#level-2').val(district);
				}
			},
			events : {
				initProductRadioClick: function(){
                    $$('.payment-li').off('click').on('click' , function(e){
                        
                        $$('button.mdui-btn.payment-type.radios').removeClass('active');
                        $$('button.mdui-btn.payment-type.radios').html('<i class="mdui-icon material-icons">radio_button_unchecked</i>');
                        
                        $$(this).children('button.mdui-btn.payment-type.radios').addClass('active');
                        $$(this).children('button.mdui-btn.payment-type.radios').html('<i class="mdui-icon material-icons">radio_button_checked</i>');
                        
                        _monitor.addMonitor({'eventAims':'CHANGE_PAYMENT_TYPE', 'eventName': 'CLICK', 'aimsCategory': 'EVENT'});
                    });
                },
			},
			init : function(){
				app.methods.initPhoneReg();
				app.methods.initCart();
				app.methods.initCityPicker();
				app.events.initProductRadioClick();
				app.methods.initCheckType();
			}
		}
		$$(function(){
			app.init();
		});
	</script>
</html>
